[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
!                        Logical NOT operator (unary)

 !exp                    logical NOT
  exp                    any integral type (int, char, enum, etc.)

    The unary operator ! performs a logical inversion on exp.  If exp has a
    value of  FALSE, then  !exp has  a value  of TRUE.   If  exp has a TRUE
    value, then !exp has a value of FALSE.  Here are two examples:

           j = 256;
           i = !j;              # i == 0

           j = 0;
           i = !j;              # i == 1

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson